public class AssignOperatorTest1 {
    public static void main(String[] args) {
        int a;
        a = 1;
//        1 = a;//错误 =左边必须是一个变量

        System.out.println("================");
        int i = 1;
        int j = 2;
        i += j; //等价于  i = i + j
        System.out.println("i = " + i);//i=3
        System.out.println("j = " + j);//j=2

        System.out.println("===================");
        int k = 3;
        int n = 6;
        k *= k + n;//等价于  k = k * (k+n)  k = 3 * (3+6) = 27
        System.out.println("k = " + k);

        System.out.println("=====================");
        byte b1 = 1;
        byte b2 = 127;
//        b1 = b1 + b2;//报错 ，b1+b2升级为int
        b1 += b2;//等价于  b1 = (byte)(b1 + b2)
        System.out.println("b1 = " + b1);//-128
    }
}
